Optimal. Leaf size=53 \[ \frac{\cot (c+d x)}{a d}-\frac{\tanh ^{-1}(\cos (c+d x))}{2 a d}-\frac{\cot (c+d x) \csc (c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.102679, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.185, Rules used = {2839, 3768, 3770, 3767, 8} \[ \frac{\cot (c+d x)}{a d}-\frac{\tanh ^{-1}(\cos (c+d x))}{2 a d}-\frac{\cot (c+d x) \csc (c+d x)}{2 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2839
Rule 3768
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \frac{\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac{\int \csc ^2(c+d x) \, dx}{a}+\frac{\int \csc ^3(c+d x) \, dx}{a}\\ &=-\frac{\cot (c+d x) \csc (c+d x)}{2 a d}+\frac{\int \csc (c+d x) \, dx}{2 a}+\frac{\operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{a d}\\ &=-\frac{\tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac{\cot (c+d x)}{a d}-\frac{\cot (c+d x) \csc (c+d x)}{2 a d}\\ \end{align*}
Mathematica [A] time = 0.398791, size = 94, normalized size = 1.77 \[ \frac{\left (\csc \left (\frac{1}{2} (c+d x)\right )+\sec \left (\frac{1}{2} (c+d x)\right )\right )^2 \left (\sin (2 (c+d x))-\cos (c+d x)+\sin ^2(c+d x) \left (\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )\right )\right )}{8 a d (\sin (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.114, size = 94, normalized size = 1.8 \begin{align*}{\frac{1}{8\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}}-{\frac{1}{2\,da}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }+{\frac{1}{2\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}}+{\frac{1}{2\,da}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) }-{\frac{1}{8\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.10902, size = 155, normalized size = 2.92 \begin{align*} -\frac{\frac{\frac{4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a} - \frac{4 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac{{\left (\frac{4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{a \sin \left (d x + c\right )^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.93126, size = 247, normalized size = 4.66 \begin{align*} -\frac{{\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) -{\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) + 4 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{4 \,{\left (a d \cos \left (d x + c\right )^{2} - a d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cos ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}}{\sin{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.36731, size = 127, normalized size = 2.4 \begin{align*} \frac{\frac{4 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{a} + \frac{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 4 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{2}} - \frac{6 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 4 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1}{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]